using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Infrastructure.Entities.Repository;

namespace CollegeShop.Infrastructure.Entities.Entity
{
    public class Authority : IAccessible<T_Authority, Authority>, ILogicEntity<T_Authority, Authority>
    {
        public int ID { get; set; }

        public string AuthorityName { get; set; }

        protected override void Covariant(T_Authority model)
        {
            if (model != null)
            {
                    this.ID = model.ID;
                    this.AuthorityName = model.AuthorityName;
            }
}
        protected override T_Authority Inverter(Authority model)
        {
            if (model != null)
            {
                return new T_Authority()
                {
                    ID = model.ID,
                    AuthorityName = model.AuthorityName,
                };
            }
            return null;
        }
        public Authority Set(T_Authority dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
